package org.openlaszlo.eu.io.dto;
import java.util.List;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;


/**
 *	This class represent a file descriptor. A file could be a directory or a simple file.
 *
 * @author Dominique Vernier
 *
 */
@XStreamAlias("file")
public class FileDescriptorDTO extends FileManagerDTO {
	
	/**
	 * The file name.
	 */
	@XStreamAsAttribute
	private String name;

   	/**
   	 * The file size in byte 
   	 */
   	@XStreamAsAttribute
   	private long size;
   	
   	/**
   	 * The file type
   	 */
   	@XStreamAsAttribute
   	private String type;

   	/**
   	 * The relative path of the file.
   	 */
   	@XStreamAsAttribute
   	private String path;
   	
   	/**
   	 * The list of sub directory.
   	 */
   	@XStreamImplicit
   	private List<FileDescriptorDTO> list;

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the size
	 */
	public long getSize() {
		return size;
	}

	/**
	 * @param size the size to set
	 */
	public void setSize(long size) {
		this.size = size;
	}

	/**
	 * @return the type
	 */
	public String getType() {
		return type;
	}

	/**
	 * @param type the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}

	/**
	 * @return the path
	 */
	public String getPath() {
		return path;
	}

	/**
	 * @param path the path to set
	 */
	public void setPath(String path) {
		this.path = path;
	}

	/**
	 * @return the list
	 */
	public List<FileDescriptorDTO> getList() {
		return list;
	}

	/**
	 * @param list the list to set
	 */
	public void setList(List<FileDescriptorDTO> list) {
		this.list = list;
	}
   	
	
}
